<?php

/**
 * Created by PhpStorm.
 * User: kc
 * Date: 2017/2/27
 * Time: 11:32
 */
class OrderEvaluation extends Eloquent
{
    protected $table = 'order_evaluation';

    /**
     * @Author:      kc
     * @DateTime:    2017-02-27 14:30:30
     * @Description: 评价列表
     * @Param: array $order_id 订单id
     * @Param:  $page 页码
     * @Param:  $page_size 每页多少条
     * @Return: Object
     */
    public static function getEvaluation($order_id,$page,$page_size){
        return OrderEvaluation::whereIn('order_id',$order_id)
            ->where('is_show',1)
            ->orderBy('created_at','desc')
            ->skip($page_size*($page-1))
            ->take($page_size)
            ->get();
    }
}